<!DOCTYPE html>
<html style="height:100%">
<head>
    <title>编辑模块</title>
    <% include ../layouts/import.ejs %>
</head>
<body style="height:100%">
<div class="row">
    <form id="updateForm" role="form" method="post" action="/module/<%= action %>" class="form-horizontal">
        <input type="hidden" value="<%= module.id %>" name="id">
        <div class="form-group">
            <label class="col-lg-4 control-label">模块名称</label>
            <div class="col-lg-8">
                <input type="text" value="<%= module.moduleName %>" id="moduleName" name="moduleName" class="form-control">
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg-4 control-label">模块描述</label>
            <div class="col-lg-8">
                <input type="text" value="<%= module.moduleDescription %>" id="moduleDescription" name="moduleDescription" class="form-control">
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg-4 control-label">依赖模块</label>
            <div class="col-lg-8">
                <select class="js-example-basic-multiple form-control" name="dependencies" multiple="multiple"></select>
            </div>
        </div>
    </form>
</div>
<script>
    $(function () {
        $('.js-example-basic-multiple').select2({
            ajax: {
                url: '/module/moduleList',
                dataType: 'json'
            }
        });
    })
</script>
</body>
</html>